using Tatibah;

namespace Tables
{
	// See the DocumetAPI.PDF for the results
    class Program
	{
		static void Main(string[] args)
		{
			// Create the document
            Document document = new Document(@"C:\Tatibah\Results\Table.docx");

			//  Special case with zero rows, rows can be added later.
            Table tableNoRows = new Table(0, 2);

			// Create a 2x2 table with an Image in top right corner
			// and bottom left  corner
            Table table = new Table(2, 2);
			table[0][0].Append(
                new Paragraph("Image on right has no border."),
                new Paragraph("However the image below does.")
               );

			// Add an Image            
            table[0][1].Append(
                new Image(@"C:\Word\Images\Image1.png")
               );

			// Add Image with a dark blue border 2.25 points wide
            table[1][0].Append(new Image(@"C:\Word\Images\Image2.png")
				{ BorderColour = "0000BB", BorderWidth = 2.25 });

            table[1][1].Append(
                new Paragraph("Image above has no border."),
                new Paragraph("However the image on the left does.")
                );
            
            // Add the table to the Document
            document.Append(table);

            // Save the Document
            document.Save();
            document.Close();

        }
    }
}
